Next 基础修改

前言

给阿策策搭了博客,是直接把我的项目拉了过去,很多个人化的东西还没有做,这里写一下。

Hexo 是博客的一种方案,而 Next 可以理解为是 Hexo 下的一个主题

博客文件夹下有个 _config.yml,主题的 Next 目录下也有个 _config.yml 文件,分别用来配置不同的一些东西。

我的图床链接 http://106.13.190.225/ 国内域名搞起来有点麻烦。。之前用的国外的服务器,但是有点贵。。。直接把图片拖上去或者ctrl+c ctrl+v 或者 用 print screen sys rq 那个键直接截取,然后 把鼠标放到框框里 按 ctrl+v。

Hexo

可以配置站点的一些信息

这里直接把我的博客下的 _config.yml 拿过来加了 ‘#’ 的后面都是注释

没在后面注释的可以看英文大致了解,基本上不用改

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: 自由 #博客名
subtitle: #博客子标题
description: #描述,由于这里我改了代码,所以不生效吧
keywords: Unity;生活;艺术;游戏; #关键词
author: 胡桃 #作者名
language: zh-CN #语言
timezone: #时区,不填自动选取电脑时区

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://orangexx.github.io/ #我的域名
root: / #不是分配的子域名的话 默认即可
permalink: :year/:month/:day/:category/:title/
permalink_defaults:

# Directory
source_dir: source #.md文件目录
public_dir: public #发布文件夹
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Search
search:
path: ./public/search.xml
field: post
format: html
limit: 20


# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace:

# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next

symbols_count_time:
#文章内是否显示
symbols: true
time: true
# 网页底部是否显示
total_symbols: true
total_time: true

# Security

sitemap:
path: sitemap.xml
template: ./sitemap.xml
sitemap: true
##
encrypt:
enable: true
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo: git@github.com:Orangexx/Orangexx.github.io.git
branch: master

Next

next 下的 _config.yml

  • favicon 下的 /images 指的是 E:\Blog\themes\next\source\images 自己把图片放进去然后修改,也可以使用

  • 阿策 有个 bing_site 你搜一下 然后删掉吧。。。

  • menu 这个比较重要

    • 以 日常 那一行为例, “/categories/日常/“ 代表 “https://orangexx.github.io/categories/日常/" 这个链接;
    • 日常 代表日常这两个字
    • calendar 代表图片日常左边的那个图标
    • 这样我们就可以自己自定义一些链接跳转了
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    menu:
    #home: / || home #相当于https://orangexx.github.io
    日常: /categories/日常/ || calendar
    Unity: /categories/Unity/ || heartbeat
    ACG: /categories/ACG/ || user
    计院素养: /categories/计院素养 || heartbeat
    #https://orangexx.github.io/categories/日常/
    #tags: /tags/ || tags
    #categories: /categories/ || th
    #archives: /archives/ || archive
    about: /about/ || th
    #https://orangexx.github.io/categories/日常/
    #schedule: /schedule/ || calendar
    #sitemap: /sitemap.xml || sitemap
    #commonweal: /404/ || heartbeat
  • 然后是 social 这里代表了自己一些联系方式或者其他平台的主页

  • 友链 扩列用的,互相商业宣传23333,这就把阿策加上

  • 改头像在这里 有一些属性 改一改可以有不同的效果

    url 就是头像的地址,可以把图片上传到我的图床 或者直接用 source/image 的路径试一试,像上面的图标一样,可能会慢一些

结语

剩下扩展的部分可以看 Next 定制化记录 那一篇 直接点开就好了。

0%